<?php
class BaseBrandModel extends RelationModel {
    public $_link = array(
        'Share'=>array(
                'mapping_type' =>HAS_MANY,
                    'class_name'=>'Share',
                    'foreign_key'=>'brand_id',
                    'mapping_name'=>'share',
        ),
        'UserHistory'=>array(
                'mapping_type' =>HAS_MANY,
                    'class_name'=>'UserHistory',
                    'foreign_key'=>'brand_id',
                    'mapping_name'=>'history',
        ),
        'BaseCommodity'=>array(
                'mapping_type' =>HAS_MANY,
                    'class_name'=>'BaseCommodity',
                    'foreign_key'=>'brand_id',
                    'mapping_name'=>'commodity',
        ),       
         'BaseCategory'=>array(
                'mapping_type' =>BELONGS_TO,
                    'class_name'=>'BaseCategory',
                    'foreign_key'=>'category_id',
                    'mapping_name'=>'category',
        ),
         'UserCommodityScore'=>array(
                'mapping_type' =>HAS_MANY,
                    'class_name'=>'UserCommodityScore',
                    'foreign_key'=>'brand_id',
                    'mapping_name'=>'CommodityScore',
        ),
    );
}
?>
